﻿using SmartSapce.ServiceLocation;
using SmartSpace.Web;
using SmartSpace.Workflow;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SmartSpace.WebApp.Modules.Workflow
{
    public partial class WorkflowList : SsTemplatePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                IWorkflowService service = ServiceLocator.Get<IWorkflowService>();
                ListResult<WorkflowMetadata> workflows = service.GetWorkflows();

                _ctlList.DataSource = workflows.Data;
                _ctlList.DataBind();
            }
        }
    }
}